;       MACRO - TESTS FOR DOS 2.0, EXITS IF DOS 1.

TEST_DOS2       MACRO
        LOCAL   VERSOK
        MOV     AH,GET_VERSION
        INT     DOS
        CMP     AL,2
        JGE     VERSOK
        CALL    TYPTX
        DB      "MS/PCDOS 2 Required.",0DH,8DH
        MOV     AH,ABORT
        INT     DOS
VERSOK:
        ENDM

DOSCALL	MACRO	FUNCT			;ISSUE A DOS FUNCTION CALL
	MOV	AH, FUNCT
	INT	DOS
	ENDM

COMPLIST MACRO  LIST,BRANCH             ;COMPARE AL WITH A SERIES OF VALUES
        IRP     XX,<LIST>
        CMP     AL,XX
        JE      BRANCH
        ENDM
        ENDM

;       COMPARE TWO CHARACTER STRINGS (POINTED AT BY SI AND DI) UNTIL NO MATCH
;       OR ZERO BYTE:

COMP_STRINGS    MACRO
        LOCAL   ENDSRC,NOTEQU,COMPNAM
COMPNAM:
        MOV     AL,DS:[SI]
        CMP     AL,0
        JE      ENDSRC                  ;IF END OF SOURCE
        CMP     AL,BYTE PTR DS:[DI]
        JNE     NOTEQU                  ;IF FAILURE TO MATCH
        INC     DI
        INC     SI
        JMP     COMPNAM
ENDSRC: CMP     AL,BYTE PTR DS:[DI]
NOTEQU:
        ENDM

